Skip to content

docs(python): update integrations for stream mode#18526

Open
inventarSarah wants to merge 1 commit into
masterfrom
smi/span-first/python-integrations
Open

docs(python): update integrations for stream mode#18526
inventarSarah wants to merge 1 commit into
masterfrom
smi/span-first/python-integrations

Conversation

@inventarSarah

@inventarSarah inventarSarah commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

DESCRIBE YOUR PR

This PR contains the updated integration docs for stream mode.

what I did:

  • added a callout (include) at the top about stream mode
  • added a callout (include) under the Options heading
  • added an inline comment when start_transaction is used

I decided to add callouts rather than make direct edits to each integration file.
I still need to update the integration files to match our new quick start guide format -> could update the stream mode docs then too

Important

Broken links: I added links to the New Spans guide on these pages, but since this guide does not exist in this branch, we get a linting error.
Should only be merged after #18456

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

LEGAL BOILERPLATE

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

EXTRA RESOURCES

@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sentry-docs Ready Ready Preview, Comment Jun 24, 2026 12:00pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
develop-docs Ignored Ignored Preview Jun 24, 2026 12:00pm

Request Review

@inventarSarah inventarSarah force-pushed the smi/span-first/python-integrations branch from b09e983 to 8e5d8e1 Compare June 24, 2026 11:49
@inventarSarah inventarSarah marked this pull request as ready for review June 24, 2026 11:50

@alexander-alderman-webb alexander-alderman-webb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks looks good! A few more occurrences of diverging names that I didn't call out

Comment on lines +45 to 46
# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode
with sentry_sdk.start_transaction(name="The result of the AI inference"):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't really matter but I think the names should be aligned here

Suggested change
# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode
with sentry_sdk.start_transaction(name="The result of the AI inference"):
# or sentry_sdk.traces.start_span(name="The result of the AI inference", parent_span=None) in stream mode
with sentry_sdk.start_transaction(name="The result of the AI inference"):

Comment on lines +70 to 71
# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode
with sentry_sdk.start_transaction(name="testing_sentry"):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't really matter but I think the names should be aligned here

Suggested change
# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode
with sentry_sdk.start_transaction(name="testing_sentry"):
# or sentry_sdk.traces.start_span(name="testing_sentry", parent_span=None) in stream mode
with sentry_sdk.start_transaction(name="testing_sentry"):

Comment on lines +42 to 43
# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode
with sentry_sdk.start_transaction(name="testing_sentry"):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't really matter but I think the names should be aligned here

Suggested change
# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode
with sentry_sdk.start_transaction(name="testing_sentry"):
# or sentry_sdk.traces.start_span(name="testing_sentry", parent_span=None) in stream mode
with sentry_sdk.start_transaction(name="testing_sentry"):

Comment on lines +37 to 38
# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode
with sentry_sdk.start_transaction(name="testing_sentry"):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode
with sentry_sdk.start_transaction(name="testing_sentry"):
# or sentry_sdk.traces.start_span(name="testing_sentry", parent_span=None) in stream mode
with sentry_sdk.start_transaction(name="testing_sentry"):

Comment on lines 115 to +116
with sentry_sdk.start_transaction(name="calling-a-celery-task"):
# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
with sentry_sdk.start_transaction(name="calling-a-celery-task"):
# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode
with sentry_sdk.start_transaction(name="calling-a-celery-task"):
# or sentry_sdk.traces.start_span(name="calling-a-celery-task", parent_span=None) in stream mode

Comment on lines +63 to 64
# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode
with sentry_sdk.start_transaction(name="The result of the AI inference"):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode
with sentry_sdk.start_transaction(name="The result of the AI inference"):
# or sentry_sdk.traces.start_span(name="The result of the AI inference", parent_span=None) in stream mode
with sentry_sdk.start_transaction(name="The result of the AI inference"):

Comment on lines +147 to 148
# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode
with sentry_sdk.start_transaction(op="function", name="testing_sentry"):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode
with sentry_sdk.start_transaction(op="function", name="testing_sentry"):
# or sentry_sdk.traces.start_span(name="testing_sentry", parent_span=None) in stream mode
with sentry_sdk.start_transaction(op="function", name="testing_sentry"):

Comment on lines +41 to 42
# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode
with sentry_sdk.start_transaction(name="testing_sentry"):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode
with sentry_sdk.start_transaction(name="testing_sentry"):
# or sentry_sdk.traces.start_span(name="testing_sentry", parent_span=None) in stream mode
with sentry_sdk.start_transaction(name="testing_sentry"):

Comment on lines +70 to 71
# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode
with sentry_sdk.start_transaction(name="testing_sentry"):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode
with sentry_sdk.start_transaction(name="testing_sentry"):
# or sentry_sdk.traces.start_span(name="testing_sentry", parent_span=None) in stream mode
with sentry_sdk.start_transaction(name="testing_sentry"):

Comment on lines +182 to 183
# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode
with sentry_sdk.start_transaction(name="testing_sentry"):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode
with sentry_sdk.start_transaction(name="testing_sentry"):
# or sentry_sdk.traces.start_span(name="testing_sentry", parent_span=None) in stream mode
with sentry_sdk.start_transaction(name="testing_sentry"):

def divide(a, b):
return a/b

# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the other naming consistency comments that Alex has left elsewhere

Suggested change
# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode
# or sentry_sdk.traces.start_span(name="ray-test", parent_span=None) in stream mode

sentry_sdk.init(...) # same as above
r = redis.Redis(host='localhost', port=6379, decode_responses=True)

# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode
# or sentry_sdk.traces.start_span(name="testing_sentry", parent_span=None) in stream mode

sentry_sdk.init(...) # same as above
rc = RedisCluster(host='localhost', port=16379)

# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode
# or sentry_sdk.traces.start_span(name="testing_sentry", parent_span=None) in stream mode

sentry_sdk.init(...) # same as above
r = redis.Redis(host='localhost', port=6379)

# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# or sentry_sdk.traces.start_span(name="your_span_name", parent_span=None) in stream mode
# or sentry_sdk.traces.start_span(name="testing_sentry", parent_span=None) in stream mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants